#define _CRT_SECURE_NO_WARNINGS 1
#include <cmath>
#include <iostream>
#include <math.h>
#include<algorithm>
#include <vector>
using namespace std;

class Solution {
public:
    bool isCircularSentence(string sentence) {
        if (sentence.back() != sentence.front()) {
            return false;
        }
        for (int i = 0; i < sentence.size(); i++) {
            if (sentence[i] == ' ' && sentence[i + 1] != sentence[i - 1]) {
                return false;
            }
        }
        return true;
    }
};

int main() {
    
    return 0;
}
